import GoodsList from './goods-list.vue'
import tabbarIndex from './all-tabbar.vue'
import AllHeader from './all-header.vue'
import ALLbtn from './all-btn.vue'
import HomeSkeleton from '../skeleton/skeleton.vue'
import ALLpay from './all-pay.vue'
import PayPass from './pay-pass.vue'

let components = [
    GoodsList,
    tabbarIndex,
    AllHeader,
    HomeSkeleton,
    ALLbtn,
    ALLpay,
    PayPass
]

const MyComponents = { 
    install(app) { // vue.use()的时候就会被调用
        components.forEach(component => { 
            app.component(component.__name, component)
            if (!component.___name) { 
                app.component(component.name, component)
            }
        })
    }
}

export default MyComponents